[SPARK-7837] [SQL] Avoids double closing output writers when commitTask() fails#8236
Closed
liancheng wants to merge 1 commit into
Closed
[SPARK-7837] [SQL] Avoids double closing output writers when commitTask() fails#8236liancheng wants to merge 1 commit into
liancheng wants to merge 1 commit into
Conversation
Contributor
Author
|
cc @yhuai |
Contributor
|
LGTM |
|
Test build #1628 has finished for PR 8236 at commit
|
asfgit
pushed a commit
that referenced
this pull request
Aug 17, 2015
…sk() fails When inserting data into a `HadoopFsRelation`, if `commitTask()` of the writer container fails, `abortTask()` will be invoked. However, both `commitTask()` and `abortTask()` try to close the output writer(s). The problem is that, closing underlying writers may not be an idempotent operation. E.g., `ParquetRecordWriter.close()` throws NPE when called twice. Author: Cheng Lian <lian@databricks.com> Closes #8236 from liancheng/spark-7837/double-closing. (cherry picked from commit 76c155d) Signed-off-by: Cheng Lian <lian@databricks.com>
Contributor
Author
|
Merged to master and branch-1.5. |
|
Test build #41014 has finished for PR 8236 at commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When inserting data into a
HadoopFsRelation, ifcommitTask()of the writer container fails,abortTask()will be invoked. However, bothcommitTask()andabortTask()try to close the output writer(s). The problem is that, closing underlying writers may not be an idempotent operation. E.g.,ParquetRecordWriter.close()throws NPE when called twice.